home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Free 28
/
Commodore_Free_Issue_28_2009_Commodore_Computer_Club.d64
/
iv svfig
< prev
next >
Wrap
Text File
|
2023-02-26
|
16KB
|
624 lines
u
*************************************
* INTERVIEW WITH (SVFIG) *
*Silicon Valley Forth Interest Group*
*************************************
COMMODORE FREE
Please introduce yourselves
KEVIN APPERT
I'm Kevin Appert Vice Chair & Program
Chair of the Silicon Valley Forth
Interest Group (SVFIG).
AK> Andy Korsak, Forth user
enthusiast since 1977.
PG> We're the peanut gallery. We make
comments which are witty or
instructive but anonymous. Some of
the PG comments are from the February
SVFIG meeting.
CF> Can you tell our readers about
FIG (Forth Interest Group)?
KA> FIG has disbanded. The Silicon
Valley Forth Interest Group (SVFIG)
maintains as much of what FIG did as
practical & appropriate including
FIG's website at http://www.forth.org
We practice & promote the Forth
Programming language in our area &
worldwide.
PG> FIG was a worldwide organization
of Forth users started in the 70s
with the creation of FIG-Forth.
KA> FIG-Forth was a publicly
available implementation on every
common microprocessor of the time.
This brought Forth to the masses &
precipitated a long era of Forth
popularity.
PG> We'll quibble about the "EVERY
common microprocessor".
KA> There were some obscure ones
which weren't implemented but ALL the
microprocessors that were commonly
used at the time were implemented. If
anyone can come up with a counter-
example, I'd be pleased to hear
about it.
CF> Where do you meet?
KA> SVFIG is currently meeting once a
month at Stanford University in Palo
Alto, California. We maintain a
continuous "virtual meeting" through
our email list & web site. Once per
year SVFIG hosts Forth Day, the gala
Forth festival notable as the venue
for Chuck Moore's "Fireside Chat".
Video from this past Forth Day will
be on the site within the next month
or so.
CF> Are there FIG groups in other
countries?
KA> There are other communities of
Forth devotees on the web & in
other countries listed under "Other
Forth Groups" on our home page at
http://forth.org/ If you are
interested in one of these groups you
can contact them directly. There is a
longstanding community on
news:comp.lang.forth which can be
reached through
http://groups.google.com/ Our website
is a member of the Forth Web Ring
which you can navigate with the strip
near the bottom of the home page.
CF> How could someone join?
KA> There is no formal membership.
One participates by subscribing to
the mailing list or coming to a
meeting.
CF> Can you tell our readers how
Forth as a language started & the
approximate year?
KA> The year was 1968. Forth was
invented by Chuck Moore to facilitate
the design graphics software he was
writing. You can read about it in
more detail at some of the sites
listed below...
History of Forth:
http://www.colorforth.com/bio.html
http://www.forth.com/corp/
background.html
http://www.forth.com/resources/
evolution/index.html
http://en.wikipedia.org/wiki/
Forth_(programming_language)#History
http://en.wikipedia.org/
wiki/Chuck_Moore
AK> The genius inventor, Charles H.
Moore, was just interviewed & tells
the story:
http://www.computerworld.com.au/
article/250530/-z_programming_
languages_forth?pp=1
CF> Do you know why there was a need
for such a language to evolve?
KA> From the very start, Forth was
the solution to any number of
problems. It's very effective & fun
to use.
AK> When Bill Ragsdale (look him up
at http://qrz.com -- he's now a radio
ham, as I am) & Dave Boulton gave
us a brief talk about their setting
up the first FIG back around 1977 at
a Homebrew Computer Club meeting at
Stanford University.
PG> The three factors which most
fertilized the birth of Forth were:
1) Portability - an instruction-set
Diaspora was making it necessary to
have some way of moving easily from
one machine to another.
B) Interactivity - computing was
changing into a process where a
programmer could interact in real
time with the computer.
III) Simplicity - a simple &
consistent architecture & syntax
for human-machine interaction.
CF> When did you first come into
"contact" with Forth as a language?
KA> I first learned about Forth from
the Byte magazine "Forth Issue" &
an inexpensive Forth which was
available at the time for my
6502-based OSI-C1P computer.
PG> Forth, Inc. had a booth at Wescon
in San Francisco in 1975.
CF> Why in your opinion is the
language still in use & who still
uses the language?
KA> Forth has much to recommend it.
You can roam the web for hours
reading about its benefits.
The most important aspect of Forth to
me is the capability of producing
reliable programs. There are two
reasons for this:
1) Proper Forth source is small,
modular & simple. The code is
frequently "correct by inspection".
You can look at it & see problems
or their lack.
B) Modules can be incrementally &
interactively tested in the Forth
environment.
Please note that there are no
guarantees of producing reliable code
with ANY language. There are few
"safety guards" in Forth. Like a
sharp tool, Forth can be used to
great effect or when used improperly
it can lop off fragments of anatomy.
Mitch Bradley writes: "Forth is weird
compared to most popular computer
languages. Until you learn how, it is
hard to read because it is not based
on the syntax of algebraic
expressions."
"But it is worth learning because a
running Forth system gives you an
extraordinary degree of low-level
control over the system. Unlike most
other programming environments that
put up walls to hide or block access
to "unauthorized" things, Forth makes
it easy to get at anything, at any
level from low to high."
CF> Who still uses the language?
KA> Forth programming, as distinct
from using things written in Forth,
is still popular in certain quarters.
Here are a few users:
* There are a lot of hobbyists &
enthusiasts.
* Forth Inc. is the largest
commercial Forth house. Some of their
successes are described on their
website.
* IntellaSys has a chip with an array
of 40 Forth processors.
* A lot of Sun machines start up with
Open Firmware, a dialect of Forth.
The One Laptop Per Child project
hardware also uses Open Firmware.
* MPE in England is another Forth
business.
* An MPE customer, Construction
Computer Software (CCS) in Cape Town
produce the MARS & CANDY
applications which are a standard all
over the world.
CF> What are the main benefits of the
Forth language?
KA> How much time do you have? I
could go on for hours! Here are some
quick thoughts:
* It's a tool for the production of a
RELIABLE product
* It's extensible. You add on to the
language at will.
* It's quick to code. You can put
together a working prototype in the
blink of an eye & iterate it into a
finished product with astounding
speed. A do-over is frequently
necessary even in the best-planned
implementation effort & with Forth
you can come to this realization
sooner & re-implement within the
time available instead of duct-taping
your first try.
* It executes quickly. Small pieces
are easy to optimize & an assembler
is built into the language when
necessary for machine-language speed.
* It's a programmer amplifier. It
makes a good programmer better. Of
course there are bad programmers &
the attendant downside.
* It's frugal with machine resources.
Some might tell you the era of the
resource-limited computers is over
but there are still plenty of
applications where battery, memory,
or other resources are constrained.
Note that size also figures into my
comments about reliability.
* It's portable. I'm not aware of any
general-purpose processor that has no
Forth. Implementation is
comparatively simple & usually
straightforward. I can demonstrate
this by noting the vast array of
available Forth's & Forth-like
Languages available for the asking
(and the buying, of course) for any
computer you'd care to name.
* It can be its own operating system
for embedded applications including a
cooperative multi-tasker.
* It's the native language of custom
or FPGA Forth processors like the
IntellaSys SeaForth-24 chip, an array
of 24 Forth processors with
spectacular potential. More about
this later on.
* It's interactive. You can test a
module immediately after writing it,
while you still have all aspects of
it in your head.
* It's the language of choice for
interacting with & bringing up new
hardware. My favourite examples of
this are the Mac & the Atari ST.
Both of which had Forth as their
'milk language' in the early times on
the bench.
CF> Is Forth an abbreviation like
BASIC (beginners all purpose symbolic
instruction code)?
KA> No, it's just a word, not an
acronym. Chuck Moore was using what
he perceived to be the fourth
generation of computing & had to
throw one letter overboard because
his OS only had five-character
strings.
CF> Is Forth a compiled language? For
the benefit of the readers unsure
about the term "compiled" can you
explain its meaning.
KA> As it says on some social
networking sites, "It's complicated".
AC-language compiler, for example,
runs & translates source code into
the directly-executable machine
instructions of a given
microprocessor or computer. When you
compile Forth source it is translated
by a simple compiler into
instructions for Forth's "Virtual
Machine". When you run a compiled C
program the computer executes its
instructions. In traditional Forth,
an Interpreter takes the Virtual
Machine instructions & gives them
to the CPU as machine instructions.
Some modern Forths have evolved into
other approaches including pure
compilation & something called
subroutine-threaded code but
old-school Forth had this method of
two-phase compile-time & run-time
execution.
CF> Do you know anything about the
Forth implementation on the Commodore
range of machines?
KA> Here's somebody's list:
http://www.npsnet.com/danf/cbm/
languages.html# FORTH
I recall using Forth on Pets' & 64s
many years ago. If I wanted a Forth
now for a Commodore machine I'd poke
around on the Internet, ask around on
the SVFIG email & comp.lang.forth
then I'd try to port 6502FIG-Forth.
Here's an example of an Internet
download:
http://cbmfiles.com/genie/
C64-128ToolkitListing.html
1348 BLAZIN'FORTH MAZAX 860610 25200
Desc: Full Fig-83 Forth for C=64
CF> I really should ask "How do you
get started programming in Forth"
KA> There are downloadable Forth
packages on the Internet. I'd suggest
you start with a PC & WIN32Forth.
It has a community of users for
questions & encouragement. You can
join the SVFIG email list for more
interaction with other Forth users.
CF> In every language the programmer
comes out with a line like "I wish
the language could do.." Is there
something missing in Forth?
KA> Forth's extensibility makes you
responsible for your own destiny in
this regard. Mostly we add on things
they perceive to be missing.
Sometimes we appropriate other's
additions.
CF> Is Forth A high or low level
language?
KA> YES! Really, both... see below.
This a great question for Forth.
From Computer Hope: High Level
Language A type of advanced computer
programming language that isn't
limited by the type of computer or
for one specific job & is more
easily understood. Today, there are
dozens of high-level languages; some
commonly used high-level languages
are BASIC, C, FORTAN & Pascal.
A low level language like Assembly
Language has a one-to-one
correspondence with the instructions
of the machine. There is no
abstraction of the tedious shuffling
around of individual memory locations
and registers. A moderate-level
language like FORTRAN or C invokes
functions & operations by name
instead of having to have each small
step spelled out & takes care of
some of the book-keeping &
busy-work for you so that you can
express your program in something
closer to English & equations.
Forth bridges these levels of
abstraction. We start at the
low-level simple operations like
addition, subtraction & memory
manipulation. Occasionally it may be
necessary to go below even this low
level into the built-in assembler. We
use these simple pieces in
combination with built-in higher
-level constructs to build tools of
increasing abstraction with which we
solve the problem put before us.
CF> Does the language work via line
numbers?
KA> There are no line numbers. There
are no GOTOs, because although they
have their uses we generally still
consider them harmful.
CF> Can you give an overview of how
the language works?
KA> To write a program you define
modules. We call them "words". We
keep them in a "dictionary". Forth
starts out having some words & you
define more words in terms of the
existing ones until you have one word
or a small set of words which
performs your application.
For example, I can define a word to
print "Hello world!" with the
following:
: say_hi ." Hello world!" ;
Then, I can make a word to it ten
times like this:
: 10_hi 10 0 do say_hi cr loop ;
From the command line, I would just
type 10_hi & the result would be:
10_hi Hello world!
Hello world!
Hello world!
Hello world!
Hello world!
Hello world!
Hello world!
Hello world!
Hello world!
Hello world!
Here's another example...
Let's say I wanted to put numbers in
front of each line in the example
above. I'd define a new word:
: Numbered-hi cr
10 0 do i 1+ . ." " say_hi cr
loop ;
Numbered-hi
1 Hello world!
2 Hello world!
3 Hello world!
4 Hello world!
5 Hello world!
6 Hello world!
7 Hello world!
8 Hello world!
9 Hello world!
10 Hello world!
CF> How fast is Forth compared to
other languages like ASSEMBLER or
BASIC, & also how compact is the
code?
KA> Forth tends to be much faster
than BASIC, It can be as fast as
assembly when it needs to be by good
implementation &/or actual use of
assembly code. It tends to be much
faster than poorly written assembly.
The key to this is spot optimization
and good design. There are actually
some Forths with optimizations but in
general the onus is on you to obtain
the desired performance.
CF> Are there any books our reader
should look out for while starting
his journey programming in Forth?
KA> Forth books are generally out of
print. You can get used ones with
fair ease. There are some hits on
Amazon.com
Although it isn't in print on paper,
I recommend "Starting Forth" by Leo
Brodie. It's available online here:
http://home.iae.nl/users/mhx/sf.html
and on Forth, Inc.'s web site. For the
more advanced users, Forth, Inc. has
a couple of good books here:
http://www.forth.com/forth/
forth-books.html
"Thinking Forth" isn't for beginners
but it is highly recommended once
you've gotten started. It's available
from Amazon. They're using
print-to-order technology to produce
one copy at a time. It's online as
well as in dead tree format.
CF> Is there a question you would
have liked to have been asked?
KA> Where would I come across Forth
in my daily life?
There are many applications of Forth
in use today. One of the most
prevalent is the FedEx "wand" used by
all of that firm's couriers.
PostScript & PDF are Forth-Like
Languages. Forth, Inc. & MPE's
websites have lots of interesting
success stories. Ask Leon at Forth,
Inc. if he'll do one of these
interviews & tell you about some of
Forth's victories.
CF> Do you have any comments you
would like to add?
KA> There is lots of Forth
information on the Internet. It's
like drinking from a firehouse
sometimes. http://www.forth.org &
http://www.forth.org/svfig are good
places to start. If you're interested
in Forth & SVFIG, subscribe to the
email list & read comp.lang.forth
The IntellaSys chips will soon be
available to hobbyists in small
quantities. Look for announcements on
http://www.forth.org/svfig
and comp.lang.forth
Forth Incorporated is the world's
leading commercial Forth firm as you
might expect. They have email lists
for discussion of their SwiftForth
and SwiftX products to which anyone
may subscribe.
Wikipedia has an article on Forth at:
http://en.wikipedia.org/wiki/
Forth_(programming_language)
================================